<?php get_instance()->view('common/header');?>
<style type="text/css">
    <!--
    .text-val {
        padding-top: 3px;
        padding-left: 0;
    }

    .text-label {
        color: grey;
        text-align: right;
    }

    .btn-group, .btn-group-vertical {
        display: inline-block;
        position: absolute;
        vertical-align: middle;
    }

    .sale-summary li:first-child {
        border-top: medium none;
    }

    .sale-summary li {
        border-top: 1px solid #eee;
        overflow: hidden;
        padding: 10px 0;
    }

    .sale-summary li .sale-info {
        color: #646464;
        float: left;
        font-size: 14px;
        text-transform: uppercase;
    }

    .sale-summary li .sale-num {
        color: #169ef4;
        float: right;
        font-size: 20px;
        font-weight: 300;
    }

    .description-box img {
        width: 100%;
    }
    -->
</style>
<style type="text/css">
    div .radio-inline:nth-child(2), div .checkbox-inline:nth-child(2) {
        margin-left: 10px;
    }
    div.form-body>.tab-pane{display: none}
    div.form-body>.tab-pane.active{display: block}

    .table-scrollable > .table > thead > tr > th, .table-scrollable > .table > tbody > tr > th, .table-scrollable > .table > tfoot > tr > th, .table-scrollable > .table > thead > tr > td, .table-scrollable > .table > tbody > tr > td, .table-scrollable > .table > tfoot > tr > td{
        word-break:break-all;
    }
</style>
<div class="page-container home">
    <?php get_instance()->view('common/sidebar');?>
    <div class="page-content-wrapper">
        <div class="page-content">
            <div class="row">
                <div class="col-md-12">
                    <!-- BEGIN PAGE TITLE & BREADCRUMB-->
                    <h3 class="page-title"><?php echo $title?></h3>
                    <ul class="page-breadcrumb breadcrumb">
                        <li class="btn-group"> <a class="btn default ml_5 return" href="<?php echo getUrl('mall/home');?>"><i class="fa fa-chevron-left"></i> 返回</a> </li>
                        <li> <i class="fa fa-home"></i> <a href="<?php echo getUrl('course');?>"><?php echo $title?>  <i class="fa fa-angle-right"></i></a></li>
                        <li><a href="javascript:void(0);">详情</a></li>
                    </ul>
                    <!-- END PAGE TITLE & BREADCRUMB-->
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <div class="row">
                        <div class="col-md-12 profile-info">
                            <div class="row">
                                <div class="col-md-12">
                                    <div style="border: 1px solid #ddd; padding: 10px; margin-bottom: 30px;">
                                        <div class="row">
                                            <div class="col-md-1">
                                                <ul class="list-unstyled profile-nav">
                                                    <li><img src="<?php echo $info['imgurl']?>" class="img-responsive" alt=""></li>
                                                </ul>
                                            </div>
                                            <div class="col-md-11">
                                                <div class="row">
                                                    <div class="col-md-6">
                                                        <div class="form-group">
                                                            <label class="col-md-4 control-label text-label">标题：</label>
                                                            <div class="col-md-8 text-val"><?php echo $info['title'];?></div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-6">
                                                        <div class="form-group">
                                                            <label class="col-md-4 control-label text-label">积分：</label>
                                                            <div class="col-md-8 text-val"><?php echo $info['integral'];?></div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-6">
                                                        <div class="form-group">
                                                            <label class="col-md-4 control-label text-label">热度：</label>
                                                            <div class="col-md-8 text-val"><?php echo $info['hot'];?></div>
                                                        </div>
                                                    </div>
                        
                                                    <div class="col-md-6">
                                                        <div class="form-group">
                                                            <label class="col-md-4 control-label text-label">状态：</label>
                                                            <div class="col-md-8 text-val"><?php echo $info['status']==1 ? '禁用' : '启用';?></div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-6">
                                                        <div class="form-group">
                                                            <label class="col-md-4 control-label text-label">创建时间：</label>
                                                            <div class="col-md-8 text-val"><?php echo dateFormat($info['addtime']);?></div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!--end col-md-8-->
                    </div>
                    <!--end row-->
                    <div class="tabbable tabbable-custom tabbable-custom-profile">
                        <ul class="nav nav-tabs">
                            <li class="active"><a href="#tab_1_1" data-toggle="tab">描述信息</a></li>
                            <li class=""><a href="#tab_1_2" data-toggle="tab">轮播图片</a></li>
                        </ul>
                        <div class="tab-content">
                            <!--描述信息-->
                            <div class="tab-pane active" id="tab_1_1">
                                <div class="table-responsive">
                                	<div class="row">
	                                	<label class="col-md-2 control-label text-label">产品须知：</label>
	                                	<div class="table-container">
	                                        <?php echo $info['notice']?>
	                                    </div>
	                                </div>
	                                <div class="row">
	                                    <label class="col-md-2 control-label text-label">产品介绍：</label>
	                                    <div class="col-md-10 table-container">
	                                        <?php echo $info['introduce']?>
	                                    </div>
                                    </div>
                                </div>
                            </div>
                            
                            <!--轮播图-->
                            <div class="tab-pane" id="tab_1_2">
                                <div class="table-responsive">
                                    <div class="table-container" style="width:300px">
                                        <?php foreach ($info['showurl'] as $k=>$v){?>
                                        	<img src="<?php echo $v;?>" style="max-width: 300px;"><br><hr>
                                        <?php }?>
                                    </div>
                                    
                                </div>
                            </div>
							<!--  -->
                    </div>
                </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    var id = <?php echo $info['id'];?>;
    $(function(){
        datatable_init({
            src: $("#datatable_buy"),
            sAjaxSource: "<?php echo getUrl('user/student/buyList?id=');?>"+id,
            aoColumnDefs : [{
                'bSortable' : false,
                'aTargets' : [ 0,1,2,9]
            }]
        });

        datatable_init({
            src: $("#datatable_class"),
            sAjaxSource: "<?php echo getUrl('user/student/studentSubList?id=');?>"+id,
            bSort:false
        });

        datatable_init({
            src: $("#datatable_exam_log"),
            sAjaxSource: "<?php echo getUrl('user/student/examLogList?id=');?>"+id,
            aoColumnDefs : [{
                'bSortable' : false,
                'aTargets' : [ 0,1,2,4,8]
            }]
        });

        $('[dp]').not("[noinit]").datepicker({
            changeMonth: true,
            autoclose: true,
            format: "yyyy-mm-dd",
            language: 'zh-CN'
        });

    });
</script>
</body>
</html>